﻿<sap:ActivityDesigner x:Class="Vision.Core.ActivityComponents.IO.File.FileOpenDesigner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="clr-namespace:System;assembly=mscorlib"
    xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities"
    xmlns:sap="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation"
    xmlns:sapc="clr-namespace:System.Activities.Presentation.Converters;assembly=System.Activities.Presentation"
    xmlns:sapv="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation"
    Collapsible="True" ExpandState="True" Icon="{DynamicResource DesignerIcon}">
    <sap:ActivityDesigner.Resources>
        <ResourceDictionary x:Uid="ResourceDictionary_1">
            <DrawingBrush x:Key="DesignerIcon" Stretch="Uniform">
                <DrawingBrush.Drawing>
                    <DrawingGroup>
                        <DrawingGroup>
                            <DrawingGroup Transform="0.0245273988693953,0,0,0.0208675786852837,45.6905403137207,36.1535987854004">
                                <GeometryDrawing Geometry="F1M-1559.252,-150.697L-219.619,-150.697 -219.619,327.660 -1559.252,327.660z">
                                    <GeometryDrawing.Brush>
                                        <LinearGradientBrush StartPoint="-1051.935,-150.697" EndPoint="-1051.935,327.66" MappingMode="Absolute" SpreadMethod="Pad">
                                            <GradientStop Color="#00000000" Offset="0" ></GradientStop>
                                            <GradientStop Color="Black" Offset="0.5" ></GradientStop>
                                            <GradientStop Color="#00000000" Offset="1" ></GradientStop>
                                        </LinearGradientBrush>
                                    </GeometryDrawing.Brush>
                                </GeometryDrawing>
                                <GeometryDrawing Geometry="F1M-219.619,-150.680C-219.619,-150.680 -219.619,327.650 -219.619,327.650 -76.745,328.551 125.781,220.481 125.781,88.454 125.781,-43.572 -33.655,-150.680 -219.619,-150.680z">
                                    <GeometryDrawing.Brush>
                                        <RadialGradientBrush Center="605.714,486.648" RadiusX="117.143" RadiusY="117.143" GradientOrigin="605.714,486.648" MappingMode="Absolute" Transform="2.77438902854919,0,0,1.9697060585022,-1891.63305664063,-872.885375976563">
                                            <GradientStop Color="Black" Offset="0" ></GradientStop>
                                            <GradientStop Color="#00000000" Offset="1" ></GradientStop>
                                        </RadialGradientBrush>
                                    </GeometryDrawing.Brush>
                                </GeometryDrawing>
                                <GeometryDrawing Geometry="F1M-1559.252,-150.680C-1559.252,-150.680 -1559.252,327.650 -1559.252,327.650 -1702.127,328.551 -1904.653,220.481 -1904.653,88.454 -1904.653,-43.572 -1745.216,-150.680 -1559.252,-150.680z">
                                    <GeometryDrawing.Brush>
                                        <RadialGradientBrush Center="605.714,486.648" RadiusX="117.143" RadiusY="117.143" GradientOrigin="605.714,486.648" MappingMode="Absolute" Transform="-2.77438902854919,0,0,1.9697060585022,112.762298583984,-872.885375976563">
                                            <GradientStop Color="Black" Offset="0" ></GradientStop>
                                            <GradientStop Color="#00000000" Offset="1" ></GradientStop>
                                        </RadialGradientBrush>
                                    </GeometryDrawing.Brush>
                                </GeometryDrawing>
                            </DrawingGroup>
                            <GeometryDrawing Geometry="F1M11.286,7.963C10.661,7.963 10.254,8.253 10.004,8.806 10.004,8.806 3.536,25.910 3.536,25.910 3.536,25.910 3.286,26.581 3.286,27.691 3.286,27.691 3.286,37.341 3.286,37.341 3.286,38.424 3.943,38.966 4.942,38.966L43.504,38.966C44.489,38.966,45.098,38.248,45.098,37.122L45.098,27.472C45.098,27.472,45.204,26.702,45.004,26.160L38.286,8.963C38.101,8.451,37.649,7.975,37.161,7.963L11.286,7.963z">
                                <GeometryDrawing.Pen>
                                    <Pen Brush="#FF535353" Thickness="2" StartLineCap="Round" EndLineCap="Round" DashCap="Round" LineJoin="Round" MiterLimit="4" ></Pen>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <GeometryDrawing Geometry="F1M3.274,26.997L4.038,26.305 41.648,26.367 45.110,26.684 45.110,37.123C45.110,38.248,44.503,38.966,43.518,38.966L4.935,38.966C3.937,38.966,3.274,38.424,3.274,37.342L3.274,26.997z">
                                <GeometryDrawing.Brush>
                                    <LinearGradientBrush StartPoint="7.605,28.481" EndPoint="36.183,40.944" MappingMode="Absolute" SpreadMethod="Pad">
                                        <GradientStop Color="#FFBBBBBB" Offset="0" ></GradientStop>
                                        <GradientStop Color="#FF9F9F9F" Offset="1" ></GradientStop>
                                    </LinearGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                            <GeometryDrawing Geometry="F1M3.549,25.914C2.835,27.379 3.548,28.307 4.585,28.307 4.585,28.307 43.585,28.307 43.585,28.307 44.704,28.283 45.430,27.295 45.013,26.164L38.299,8.954C38.115,8.442,37.644,7.966,37.156,7.954L11.299,7.954C10.674,7.954 10.263,8.257 10.013,8.811 10.013,8.811 3.549,25.914 3.549,25.914z">
                                <GeometryDrawing.Brush>
                                    <RadialGradientBrush Center="15.571,2.959" RadiusX="20.936" RadiusY="20.936" GradientOrigin="15.571,2.959" MappingMode="Absolute" Transform="1.28624200820923,0.781697988510132,-0.710781991481781,1.16955196857452,-2.35434794425964,-4.87686204910278">
                                        <GradientStop Color="#FFE4E4E4" Offset="0" ></GradientStop>
                                        <GradientStop Color="LightGray" Offset="1" ></GradientStop>
                                    </RadialGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                            <GeometryDrawing Geometry="M7.858,31.274C7.858,31.219,7.903,31.174,7.958,31.174L25.383,31.174C25.438,31.174,25.483,31.219,25.483,31.274L25.483,36.637C25.483,36.692,25.438,36.737,25.383,36.737L7.958,36.737C7.903,36.737,7.858,36.692,7.858,36.637z">
                                <GeometryDrawing.Brush>
                                    <LinearGradientBrush StartPoint="7.858,33.955" EndPoint="25.483,33.955" MappingMode="Absolute" SpreadMethod="Pad">
                                        <GradientStop Color="#FF838383" Offset="0" ></GradientStop>
                                        <GradientStop Color="#00BBBBBB" Offset="1" ></GradientStop>
                                    </LinearGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                            <GeometryDrawing Geometry="F1M7.858,36.737C7.858,36.737 7.858,32.725 7.858,32.725 9.694,35.904 16.154,36.737 20.795,36.737 20.795,36.737 7.858,36.737 7.858,36.737z">
                                <GeometryDrawing.Brush>
                                    <LinearGradientBrush StartPoint="12.277,37.206" EndPoint="12.222,33.759" MappingMode="Absolute" SpreadMethod="Pad">
                                        <GradientStop Color="#FFEEEEEE" Offset="0" ></GradientStop>
                                        <GradientStop Color="#00EEEEEE" Offset="1" ></GradientStop>
                                    </LinearGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                            <GeometryDrawing Brush="White" Geometry="F1M44.796,25.629C44.860,26.879 44.382,27.945 43.474,27.972 43.474,27.972 5.355,27.972 5.355,27.972 4.066,27.972 3.488,27.647 3.271,27.104 3.363,28.049 4.097,28.754 5.355,28.754 5.355,28.754 43.474,28.754 43.474,28.754 44.550,28.721 45.227,27.330 44.826,25.759L44.796,25.629z" ></GeometryDrawing>
                            <GeometryDrawing Geometry="F1M10.969,10.156C10.923,10.357 10.781,10.543 10.781,10.750 10.781,11.699 11.372,12.539 12.125,13.344 12.365,13.190 12.490,12.989 12.750,12.844 11.810,12.028 11.197,11.127 10.969,10.156z M37.625,10.156C37.396,11.126 36.783,12.029 35.844,12.844 36.118,12.997 36.248,13.212 36.500,13.375 37.257,12.568 37.813,11.702 37.813,10.750 37.813,10.543 37.671,10.357 37.625,10.156z M39.813,18.594C39.199,22.634 32.514,25.844 24.281,25.844 16.069,25.844 9.421,22.651 8.781,18.625 8.749,18.822 8.656,19.017 8.656,19.219 8.656,23.537 15.645,27.063 24.281,27.063 32.917,27.063 39.937,23.537 39.938,19.219 39.938,19.006 39.848,18.801 39.813,18.594z">
                                <GeometryDrawing.Brush>
                                    <LinearGradientBrush StartPoint="23.688,11.319" EndPoint="23.688,26.357" MappingMode="Absolute" SpreadMethod="Pad">
                                        <GradientStop Color="#41FFFFFF" Offset="0" ></GradientStop>
                                        <GradientStop Color="White" Offset="1" ></GradientStop>
                                    </LinearGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                            <DrawingGroup Transform="1,0,0,1,0.0883884280920029,0.176776006817818">
                                <GeometryDrawing Brush="#75FFFFFF" Geometry="M8.574,25.594A1.370,1.016,0.000,1,1,5.834,25.594A1.370,1.016,0.000,1,1,8.574,25.594z" ></GeometryDrawing>
                            </DrawingGroup>
                            <DrawingGroup Transform="1,0,0,1,33.9670486450195,0.0883880406618118">
                                <GeometryDrawing Brush="#75FFFFFF" Geometry="M8.574,25.594A1.370,1.016,0.000,1,1,5.834,25.594A1.370,1.016,0.000,1,1,8.574,25.594z" ></GeometryDrawing>
                            </DrawingGroup>
                            <GeometryDrawing Geometry="F1M11.643,8.416C11.041,8.416 10.650,8.695 10.409,9.228 10.409,9.228 3.994,25.819 3.994,25.819 3.994,25.819 3.753,26.465 3.753,27.534 3.753,27.534 3.753,36.824 3.753,36.824 3.753,38.178 4.197,38.451 5.348,38.451L43.035,38.451C44.358,38.451,44.569,38.134,44.569,36.613L44.569,27.323C44.569,27.323,44.671,26.581,44.479,26.059L37.886,9.253C37.708,8.761,37.335,8.427,36.865,8.416L11.643,8.416z">
                                <GeometryDrawing.Pen>
                                    <Pen Thickness="1" StartLineCap="Round" EndLineCap="Round" DashCap="Round" LineJoin="Round" MiterLimit="4">
                                        <Pen.Brush>
                                            <LinearGradientBrush StartPoint="12.378,4.433" EndPoint="44.096,47.621" MappingMode="Absolute" SpreadMethod="Pad">
                                                <GradientStop Color="White" Offset="0" ></GradientStop>
                                                <GradientStop Color="Transparent" Offset="1" ></GradientStop>
                                            </LinearGradientBrush>
                                        </Pen.Brush>
                                    </Pen>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <GeometryDrawing Geometry="F1M40.500,31.429L40.500,36.450 M38.500,31.489L38.500,36.510 M36.500,31.489L36.500,36.510 M34.500,31.489L34.500,36.510 M32.500,31.489L32.500,36.510 M30.500,31.489L30.500,36.510">
                                <GeometryDrawing.Pen>
                                    <Pen Brush="#6CFFFFFF" Thickness="1" StartLineCap="Square" EndLineCap="Square" DashCap="Square" MiterLimit="4" ></Pen>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <GeometryDrawing Geometry="F1M39.500,31.479L39.500,36.500 M37.500,31.539L37.500,36.560 M35.500,31.539L35.500,36.560 M33.500,31.539L33.500,36.560 M31.500,31.539L31.500,36.560">
                                <GeometryDrawing.Pen>
                                    <Pen Brush="#19000000" Thickness="1" StartLineCap="Square" EndLineCap="Square" DashCap="Square" MiterLimit="4" ></Pen>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <GeometryDrawing Brush="#70FFFFFF" Geometry="F1M7.875,31.188L7.875,36.719 20.438,36.719 8.219,36.375 7.875,31.188z" ></GeometryDrawing>
                            <DrawingGroup Transform="1.03781497478485,0,0,1.06074702739716,-1.63287794589996,-2.09462594985962">
                                <GeometryDrawing Geometry="M39.875,19.563A14.875,6.688,0.000,1,1,10.125,19.563A14.875,6.688,0.000,1,1,39.875,19.563z">
                                    <GeometryDrawing.Brush>
                                        <LinearGradientBrush StartPoint="33.431,31.965" EndPoint="21.748,11.781" MappingMode="Absolute" SpreadMethod="Pad">
                                            <GradientStop Color="White" Offset="0" ></GradientStop>
                                            <GradientStop Color="#FFE6E6E6" Offset="0.5" ></GradientStop>
                                            <GradientStop Color="White" Offset="0.75" ></GradientStop>
                                            <GradientStop Color="#FFE1E1E1" Offset="0.842" ></GradientStop>
                                            <GradientStop Color="White" Offset="1" ></GradientStop>
                                        </LinearGradientBrush>
                                    </GeometryDrawing.Brush>
                                </GeometryDrawing>
                            </DrawingGroup>
                        </DrawingGroup>
                    </DrawingGroup>
                </DrawingBrush.Drawing>
            </DrawingBrush>
            <sapc:ArgumentToExpressionConverter x:Uid="sadv:ArgumentToExpressionConverter_1" x:Key="argumentToExpressionConverter" />
            <DataTemplate x:Uid="DataTemplate_1" x:Key="ExpandedFileSaveTemplate">
                <StackPanel>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="70" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="24" />
                            <RowDefinition Height="24" />
                        </Grid.RowDefinitions>

                        <!-- Inputs Header -->
                        <TextBlock Grid.Row="0" Grid.ColumnSpan="2" x:Uid="Header_1" Text="Input(s):" FontWeight="Bold" Foreground="Navy" Margin="0,0,0,3" />

                        <!-- ModelItem.FilePath -->
                        <TextBlock Grid.Row="1" Grid.Column="0" x:Uid="TextBlock_1" Text="File path:" VerticalAlignment="Top" />
                        <sapv:ExpressionTextBox Grid.Row="1" Grid.Column="1" x:Uid="filePathBox" x:Name="filePathBox"
                                MaxLines="1" Margin="7,0,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Top"
                                Expression="{Binding Path=ModelItem.FilePath, Mode=TwoWay, Converter={StaticResource argumentToExpressionConverter}, ConverterParameter=In}"
                                ExpressionType="{x:Type s:String}"
                                OwnerActivity="{Binding Path=ModelItem, Mode=OneWay}" />
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="70" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="24" />
                            <RowDefinition Height="24" />
                        </Grid.RowDefinitions>

                        <!-- Outputs Header -->
                        <TextBlock Grid.Row="0" Grid.ColumnSpan="2" x:Uid="Header_2" Text="Outputs(s):" FontWeight="Bold" Foreground="Navy" Margin="0,0,0,3" />

                        <!-- ModelItem.FileData -->
                        <TextBlock Grid.Row="1" Grid.Column="0" x:Uid="TextBlock_3" Text="File data:" VerticalAlignment="Top" />
                        <sapv:ExpressionTextBox Grid.Row="1" Grid.Column="1" x:Uid="fileDataBox" x:Name="fileDataBox"
                                MaxLines="1" Margin="7,0,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Top"
                                Expression="{Binding Path=ModelItem.FileData, Mode=TwoWay, Converter={StaticResource argumentToExpressionConverter}, ConverterParameter=Out}"
                                ExpressionType="{Binding Path=ModelItem.FileData.ArgumentType}"
                                OwnerActivity="{Binding Path=ModelItem, Mode=OneWay}" UseLocationExpression="True" />
                    </Grid>
                    <Border BorderThickness="0,0,0,3" Margin="0,5">
                        <Border.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="DarkGray" Offset="0" />
                                <GradientStop Color="White" Offset="1" />
                            </LinearGradientBrush>
                        </Border.BorderBrush>
                    </Border>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="70" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <TextBlock Grid.Row="0" x:Uid="TextBlock_5" Text="Argument:" VerticalAlignment="Top" Foreground="Gray" />
                        <TextBox Grid.Row="0" Grid.Column="1" x:Uid="TextBox_1" Text="{Binding Path=ModelItem.Body.Argument.Name, Mode=TwoWay}" Margin="7,0,0,0" Foreground="Gray" />
                    </Grid>
                    <!-- Body -->
                    <sap:WorkflowItemPresenter x:Uid="sad:WorkflowItemPresenter_1" AutomationProperties.AutomationId="Activity" IsDefaultContainer="True" HintText="Drop activity here" Item="{Binding Path=ModelItem.Body.Handler, Mode=TwoWay}" AllowedItemType="{x:Type sa:Activity}" MinWidth="100" MinHeight="100" Margin="0,7,0,0"/>
                </StackPanel>
            </DataTemplate>
            <DataTemplate x:Uid="DataTemplate_2" x:Key="CollapsedActivityViewTemplate">
                <Label x:Uid="TextBlock_6" Padding="0,0,0,0" FontStyle="Italic" Foreground="{x:Static SystemColors.GrayTextBrush}" HorizontalAlignment="Center" VerticalAlignment="Center">Double-click to view</Label>
            </DataTemplate>
            <Style x:Uid="Style_1" x:Key="FileOpenStyle" TargetType="{x:Type ContentPresenter}">
                <Setter x:Uid="Setter_1" Property="ContentTemplate" Value="{DynamicResource ExpandedFileSaveTemplate}" />
                <Style.Triggers>
                    <DataTrigger x:Uid="DataTrigger_1" Binding="{Binding Path=ShowExpanded}" Value="false">
                        <Setter x:Uid="Setter_2" Property="ContentTemplate" Value="{DynamicResource CollapsedFileSaveTemplate}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </ResourceDictionary>
    </sap:ActivityDesigner.Resources>
    <ContentPresenter x:Uid="ContentPresenter_1" Style="{DynamicResource FileOpenStyle}" Content="{Binding}" />
</sap:ActivityDesigner>
